package com.zlb.app.modules.quartz.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.zlb.app.common.entity.BaseEntity;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;

/**
 * @Desc
 * @Author zWX1367238
 * @Date 2024-08-27 11:15:55
 **/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("job")
@ApiModel("定时任务调度表")
public class Job extends BaseEntity {

    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty("任务ID")
    private Long id;

    @ApiModelProperty("任务名称")
    private String jobName;

    @ApiModelProperty("任务组名")
    private String jobGroup;

    @ApiModelProperty("调用目标字符串")
    private String invokeTarget;

    @ApiModelProperty("cron执行表达式")
    private String cronExpression;

    @ApiModelProperty("计划执行错误策略（1立即执行 2执行一次 3放弃执行）")
    private Integer misfirePolicy;

    @ApiModelProperty("是否并发执行（0禁止 1允许）")
    private Integer concurrent;

    @ApiModelProperty("状态（0暂停 1正常）")
    private Integer status;

    @ApiModelProperty("备注信息")
    private String remark;

    @TableField(exist = false)
    @ApiModelProperty("下次执行时间")
    private Date nextValidTime;

}
